package com.zhejiangzhengyuan.municipal_common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhejiangzhengyuan.municipal_common.entity.vo.CaseNoHandle;
import com.zhejiangzhengyuan.municipal_common.entity.vo.OneWayCaseNoHandVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author :linju
 * @create on : 2019/11/26
 */
@Repository
public interface CaseManagementMapper extends BaseMapper<CaseNoHandle> {

  Page<CaseNoHandle> selectAll(
      Page<CaseNoHandle> page,
      @Param("warnType") String warnType,
      @Param("dataOrigin") String dataOrigin,
      @Param("deviceCode") String deviceCode,
      @Param("reason") String reason,
      @Param("username") String username,
      @Param("startTimestamp") String startTimestamp,
      @Param("endTimestamp") String endTimestamp);

  Page<CaseNoHandle> selectCaseHandlingPage(
      Page<CaseNoHandle> page,
      @Param("caseType") String caseType,
      @Param("warnType") String warnType,
      @Param("dataOrigin") String dataOrigin,
      @Param("deviceCode") String deviceCode,
      @Param("reason") String reason,
      @Param("username") String username,
      @Param("startTimestamp") String startTimestamp,
      @Param("endTimestamp") String endTimestamp);

  Map<String, String> findFileByWarnId(@Param("warnId") Long warnId);

  List<CaseNoHandle> importNoHandleToExcel(@Param("warnType") String warnType);

  List<CaseNoHandle> selectCaseHandlingPage(
      @Param("caseType") String caseType, @Param("warnType") String warnType);

  // 未处理查询
  List<CaseNoHandle> selectCaseUntreated();
  // 道路积水处理中和已处理
  List<CaseNoHandle> selectCaseDispose(@Param("status") String status);

  Page<CaseNoHandle> selectPumpCaseNoHandlePage(
      Page<CaseNoHandle> page,
      @Param("dataOrigin") String dataOrigin,
      @Param("reason") String reason,
      @Param("username") String username,
      @Param("startTimestamp") String startTimestamp,
      @Param("endTimestamp") String endTimestamp,
      @Param("warnType") String warnType);

  Page<CaseNoHandle> selectPumpCaseHandlingPage(
      Page<CaseNoHandle> page,
      @Param("dataOrigin") String dataOrigin,
      @Param("reason") String reason,
      @Param("username") String username,
      @Param("startTimestamp") String startTimestamp,
      @Param("endTimestamp") String endTimestamp,
      @Param("caseType") String caseType,
      @Param("warnType") String warnType);

  List<CaseNoHandle> mobileNewTest(
      @Param("caseType") String caseType, @Param("warnType") String warnType);

  Page<OneWayCaseNoHandVo> selectInspectionCaseOnlyHandingPage(
      Page<OneWayCaseNoHandVo> page, @Param("caseType") String caseType);
}
